Skip to content

Add destructive command safety check - #43

Merged
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
TonMtt:fix/destructive-command-check
Sep 11, 2026
Merged

Add destructive command safety check#43
royalpinto007 merged 1 commit into
AgentPostmortem:mainfrom
TonMtt:fix/destructive-command-check

Conversation

@TonMtt

@TonMtt TonMtt commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a new destructive_command check with high severity
  • flag runnable destructive commands such as rm -rf, DROP TABLE, kubectl delete, and fork-bomb syntax when no nearby safety warning is present
  • suppress the finding when nearby guidance includes a dry-run, backup, or explicit verification warning
  • add focused tests for unsafe, cautioned, and clean cases

Closes #40

Testing

The added tests cover the acceptance cases. I could not run the suite locally because my current environment could not access GitHub to clone/install the repository; CI will run the project test suite on this PR.

@github-actions

Copy link
Copy Markdown

Welcome, @TonMtt, and thanks for your first pull request to Agentrace.

A quick look at CONTRIBUTING.md covers how things are set up and run here.

I'll review this shortly. Ask anything in the thread if something is unclear.

@royalpinto007
royalpinto007 merged commit df18a5c into AgentPostmortem:main Sep 11, 2026
8 checks passed
@github-actions

Copy link
Copy Markdown

Merged, @TonMtt. Thank you for taking the time.

Agentrace gets better every time someone outside the repo digs in like this.

If you find Agentrace useful, consider dropping a star. It helps more people find it.

Happy to see more from you whenever you have the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New check destructive_command: flag runnable destructive shell without warnings

2 participants